import http from '@/http/api.js'

// 需求单列表
const getDemandList = (data) => {
	return http.request({
		url: '/blade-tms/demandorder/AppDemandList/list',
		method: 'GET',
		data
	})
}
// 需求单详情
const getDemandDetail = (data) => {
	return http.request({
		url: '/blade-tms/demandorder/AppDemandList/detail',
		method: 'GET',
		data
	})
}
// 司机车辆押运员列表
const driverCarEscortList = (data) => {
	return http.request({
		url: '/blade-tms/demandorder/AppDemandList/driverCarEscortList',
		method: 'GET',
		data
	})
}
// 分配运单
const allocatingWaybill = (data) => {
	return http.request({
		url: '/blade-tms/demandorder/AppDemandList/allocatingWaybill',
		method: 'POST',
		data
	})
}
// 修改运单
const transportUpdate = (data) => {
	return http.request({
		url: '/blade-tms/transportorder/Waybill/update',
		method: 'POST',
		data
	})
}
// 需求单事件变更
const demandEvent = (data) => {
	return http.request({
		url: '/blade-tms/demandorder/AppDemandList/event',
		method: 'POST',
		data
	})
}
// 补全信息
const completionInfo = (data) => {
	return http.request({
		url: '/blade-tms/demandorder/AppDemandList/fill',
		method: 'POST',
		data
	})
}
// 运输单补全信息
const transportCompletionInfo = (data) => {
	return http.request({
		url: '/blade-tms/transportorder/Waybill/fillTransport',
		method: 'POST',
		data
	})
}
// 补全信息详情
const getCompletionInfo = (data) => {
	return http.request({
		url: '/blade-tms/demandorder/AppDemandList/view',
		method: 'GET',
		data
	})
}
// 运输单详情
const getWaybillDetail = (data) => {
	return http.request({
		url: '/blade-tms/transportorder/Waybill/detail',
		method: 'GET',
		data
	})
}
// 异常类型查询
const getExceptionType = (data) => {
	return http.request({
		url: '/blade-tms/transportorder/Waybill/exceptionType',
		method: 'GET',
		data
	})
}
// 异常汇报
const exceptionReport = (data) => {
	return http.request({
		url: '/blade-tms/transportorder/Waybill/exceptionReport',
		method: 'POST',
		data
	})
}
// 运输单列表
const getTransportorder = (data) => {
	return http.request({
		url: '/blade-tms/transportorder/Waybill/list',
		method: 'GET',
		data
	})
}
// 运单状态变更
const waybillStatusChange = (data) => {
	return http.request({
		url: '/blade-tms/transportorder/Waybill/waybillStatusChange',
		method: 'POST',
		data
	})
}
// 签收
const signForReceipt = (data) => {
	return http.request({
		url: '/blade-tms/transportorder/Waybill/signForReceipt',
		method: 'POST',
		data
	})
}
// 询价单列表
const getInquiryorder = (data) => {
	return http.request({
		url: '/blade-tms/enquiry/InquirySheetApp/list',
		method: 'GET',
		data
	})
}
// 询价详情
const getInquiryDetail = (data) => {
	return http.request({
		url: '/blade-tms/enquiry/InquirySheetApp/detail',
		method: 'GET',
		data
	})
}
// 询价单行项目详情
const getInquiryItemDetail = (data) => {
	return http.request({
		url: '/blade-tms/enquiry/InquirySheetApp/enquiryItemDetail',
		method: 'GET',
		data
	})
}
// 确认报价接口
const confirmOffer = (data) => {
	return http.request({
		url: '/blade-tms/enquiry/InquirySheetApp/confirmOffer?id=' + data,
		method: 'POST'
	})
}
// 报价
const quotedPrice = (data) => {
	return http.request({
		url: '/blade-tms/enquiry/InquirySheetApp/quotedPrice',
		method: 'POST',
		data
	})
}
// 报价排行列表
const getRanking = (data) => {
	return http.request({
		url: '/blade-tms/enquiry/InquirySheetApp/ranking',
		method: 'POST',
		data
	})
}
// ti交报价接口
const submitInquiry = (data) => {
	return http.request({
		url: '/blade-tms/enquiry/InquirySheetApp/submit?id=' + data,
		method: 'POST'
	})
}
// 运输单详情
const getTransportDetail = (data) => {
	return http.request({
		url: '/blade-tms/transportorder/Waybill/detail',
		method: 'GET',
		data
	})
}
//罐箱类型
const getTankType = () => {
	return http.request({
		url: 'blade-tms/common/SelectEnum?name=tank',
		method: 'GET',
	})
}
//海运/铁运
const getTransportType = () => {
	return http.request({
		url: 'blade-tms/common/SelectEnum?name=transportType',
		method: 'GET',
	})
}
// 询价单列表（新）
const getInquiryList = (data) => {
	return http.request({
		url: '/blade-tms/Inquiry/InquirySheetApp/list',
		method: 'GET',
		data
	})
}
// 询价详情 (新)
const getNewInquiryDetail = (data) => {
	return http.request({
		url: '/blade-tms/Inquiry/InquirySheetApp/detail',
		method: 'GET',
		data
	})
}
// 询价单报价信息(新)
const getNewInquiryQuoted = (data) => {
	return http.request({
		url: '/blade-tms/Inquiry/InquirySheetApp/priceList',
		method: 'GET',
		data
	})
}
// 询价单议价信息(新)
const getNegotiationDetails = (data) => {
	return http.request({
		url: '/blade-tms/Inquiry/InquirySheetApp/negotiationDetails',
		method: 'GET',
		data
	})
}
// 询价单承运商报价(新)
const newQuotedPrice = (data, id, startId) => {
	return http.request({
		url: `/blade-tms/Inquiry/InquirySheetApp/quotedPrice?id=${id}&startId=${startId}`,
		method: 'POST',
		data
	})
}
// 外贸报价详情列表(新)
const getPriceDetailList = (data) => {
	return http.request({
		url: '/blade-tms/Inquiry/InquirySheetApp/priceDetailList',
		method: 'GET',
		data
	})
}
// 外贸报价详情列表单个详情(新)
const getPriceDetail = (data) => {
	return http.request({
		url: '/blade-tms/Inquiry/InquirySheetApp/priceDetail',
		method: 'GET',
		data
	})
}
// 内贸和散货查看排行(新)
const getRankingList = (data) => {
	return http.request({
		url: '/blade-tms/Inquiry/InquirySheetApp/viewRanking',
		method: 'GET',
		data
	})
}
// 外贸询价单最大船公司数
const getMaximumNumberOfShipping = (data) => {
	return http.request({
		url: '/blade-tms/systemConfig/maximumNumberOfShipping',
		method: 'GET',
		data
	})
}
// 港口/车站接口-yr
const getStation = (data) => {
	return http.request({
		url: '/blade-tms/blade-station/station/dropDownBox',
		method: 'GET',
		data
	})
}
export default {
	getDemandList,
	getDemandDetail,
	driverCarEscortList,
	allocatingWaybill,
	transportUpdate,
	demandEvent,
	completionInfo,
	getCompletionInfo,
	getWaybillDetail,
	getExceptionType,
	exceptionReport,
	getTransportorder,
	waybillStatusChange,
	signForReceipt,
	getInquiryorder,
	getInquiryDetail,
	getInquiryItemDetail,
	confirmOffer,
	quotedPrice,
	getRanking,
	submitInquiry,
	getTransportDetail,
	getTankType,
	getTransportType,
	transportCompletionInfo,
	getInquiryList,
	getNewInquiryDetail,
	getNewInquiryQuoted,
	getNegotiationDetails,
	newQuotedPrice,
	getPriceDetailList,
	getPriceDetail,
	getRankingList,
	getMaximumNumberOfShipping,
	getStation
}
